<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="com.echo.usedsfu.entity.Information" %>
<%@ page import="com.echo.usedsfu.entity.Category" %>
<%@ page import="javax.jdo.PersistenceManager" %>
<%@ page import="com.echo.usedsfu.persistence.PMF" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">

<html>
	<head>
		<title>Edit your AD</title>
		<link rel="shortcut icon" href="/images/favicon.ico">
		<link rel="Bookmark" href="/images/favicon.ico">
		<link rel="stylesheet" href="/css/ui-lightness/jquery-ui.css" type="text/css" media="all" />
		<link rel="stylesheet" href="/css/stardust/default.css" type="text/css" media="all" />
		<script src="/js/jquery-1.3.2.min.js" type="text/javascript"></script>
		<script src="/js/jquery-ui-1.7.2.custom.min.js" type="text/javascript"></script>
	</head>
	<body>
	<div id="header-bg">
		<div id="header">
			<div id="logo">
				<h1><a href="/index.jsp">Used Staff in SFU<sup></sup></a></h1>
				<h2>Designed by FreeCSSTemplates</h2>
			</div>
			<div id="menu">
				<ul>
					<li class="active"><a href="/index.jsp">home</a></li>
				</ul>
			</div>
		</div>
	
	</div>
	
	<div id="page">
		<div id="content">
			<div class="post">
				<h1 class="title">Editing Your Text Ad Here</h>
				<div class="meta">
				</div>
			</div>
			<div class="form">
				<%
					String info_id = Long.toString((Long)session.getAttribute("info_id"));
					String title = (String)session.getAttribute("title");
					String area = (String)session.getAttribute("area");
					String contact = (String)session.getAttribute("contact");
					String description = (String)session.getAttribute("description");
					String phone = (String)session.getAttribute("phone");
					String email = (String)session.getAttribute("email");
					String img_id = (String)session.getAttribute("img_id");
				%>
				<form action="/update" method="post">
				<fieldset>
					<div>
						<input type="hidden" name="info_id" value="<%=info_id %>"/>
						<label for="title">Title</label>
						<input name="title" type="text" value="<%=title%>">
					</div>
					<div>
						<label for="area">Area</label>
						<select id="area" name="area" value="<%=area %>"> 
							<optgroup label="Apartment">
								<option value="lrh">Louis Riel House</option> 
								<option value="sh">Shell House</option>
							</optgroup> 
							<optgroup label="Building"> 
								<option value="wmc">West Mall Center</option> 
								<option value="asb">Applied Science Building</option>
							</optgroup>
						</select>
					</div>
					<div>
						<label for="contact">Contact</label>
						<input name="contact" type="text" value="<%=contact %>">
					</div>
					<div>
						<label for="description">Description</label>
						<textarea name="description" rows="2" cols="10"><%=description %></textarea>
					</div>
					<div>
						<label for="phone">Phone</label>
						<input name="phone" type="text" value="<%=phone %>">
					</div>
					<div>
						<label for="email">Email</label>
						<input name="email" type="text" value="<%=email %>">
					</div>
					<script type="text/javascript">
					$(function() {
						$("#datepicker").datepicker();
					});
					</script>
				
					<div class="demo">
						<label for="expire_time">Expire Date</label>
						<input id="datepicker" type="text" name="expire_time">
					</div>
					<div>
						<label for="img_id">Image</label>
						<input name="img_id" type="text" value="<%=img_id %>">
						<a href="/upload.jsp">Upload Image</a>
					</div>
					<div>
						<button type="submit">Update</button>
					</div>
				</fieldset>	
				</form>
			</div>
		</div>
		<!-- start sidebar -->
			<div id="sidebar">
			</div>
		<!-- end sidebar -->
	
		<div style="clear: both;">&nbsp;</div>
	</div>
	
	 <!-- start footer -->
		 <%@ include file="/include/footer.jsp" %> 
	 <!-- end footer -->
	</body>
</html>